package com.yzc.controller;

import com.yzc.model.vo.notification.MessagesNotiResp;
import com.yzc.result.Result;
import com.yzc.service.MessagesNotiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/notification")
public class MessagesNotiController {

    @Autowired
    MessagesNotiService messagesNotiService;

    @GetMapping("/loadMessagesById")
    public Result<List<MessagesNotiResp>> loadMessagesById(@RequestParam("id") Integer id) {

        return Result.success(messagesNotiService.loadMessagesById(id));
    }
}
